﻿using DocumentFormat.OpenXml.Wordprocessing;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OpenXmlTools.OpenXML.Word
{
    /// <summary>
    /// 表格边框设置配置类
    /// </summary>
    public class TableBorderSettings
    {
        /// <summary>
        /// 外部边框样式设置（顶部、底部、左侧、右侧）
        /// </summary>
        public BorderSettings OutsideBorder { get; set; } = new BorderSettings
        {
            Style = BorderValues.Single,
            Size = 4,        // 0.5磅 = 4个单位 (0.125磅/单位)
            Color = "000000" // 黑色
        };

        /// <summary>
        /// 内部水平边框设置（行之间的水平线）
        /// </summary>
        public BorderSettings InsideHorizontalBorder { get; set; } = new BorderSettings
        {
            Style = BorderValues.Single,
            Size = 4,        // 0.5磅
            Color = "000000"
        };

        /// <summary>
        /// 内部垂直边框设置（列之间的垂直线）
        /// </summary>
        public BorderSettings InsideVerticalBorder { get; set; } = new BorderSettings
        {
            Style = BorderValues.Single,
            Size = 4,
            Color = "000000"
        };

        /// <summary>
        /// 是否清除原有边框设置
        /// </summary>
        public bool ClearExisting { get; set; } = true;
    }

}
